﻿using System.Linq;
using SellAndBuy.Application.Query.DTOs;

namespace SellAndBuy.Application.Services
{
    /// <summary>
    /// Interface of Ad query service
    /// </summary>
    public interface IAdQueryService
    {
        /// <summary>
        /// Find all Ads
        /// </summary>
        /// <returns>list of Ads</returns>
        IQueryable<AdDTO> FindAds();

        /// <summary>
        /// Find all items
        /// </summary>
        /// <returns>list of items</returns>
        //IQueryable<Item> FindItems();

        /// <summary>
        /// Find all categories
        /// </summary>
        /// <returns>list of categories</returns>
        //IQueryable<ItemCategory> FindCategories();
              
        /// <summary>
        /// Find all Ads by category
        /// </summary>
        /// <returns>list of Ads</returns>
        //IQueryable<Ad> FindAds(ItemCategory category);

        /// <summary>
        /// Find all items by category
        /// </summary>
        /// <returns>list of items</returns>
        //IQueryable<Item> FindItems(ItemCategory category);

        /// <summary>
        /// Find all Ads by category
        /// </summary>
        /// <param name="category">Category</param>
        /// <param name="pageIndex">Page Index</param>
        /// <param name="pageCount">Page Count</param>
        /// <returns>list of Ads</returns>
        //IQueryable<Ad> FindAds(ItemCategory category, int pageIndex, int pageCount);

        /// <summary>
        /// Find all items by category
        /// </summary>
        /// <param name="category">Category</param>
        /// <param name="pageIndex">Page Index</param>
        /// <param name="pageCount">Page Count</param>
        /// <returns>list of items</returns>
        //IQueryable<Item> FindItems(ItemCategory category, int pageIndex, int pageCount);

        /// <summary>
        /// Find all Ads (Paged)
        /// </summary>
        /// <param name="pageIndex">Page Index</param>
        /// <param name="pageCount">Page Count</param>
        /// <returns>list of Ads (Paged)</returns>
        IQueryable<AdDTO> FindAds(int pageIndex, int pageCount);

        /// <summary>
        /// Find all items (Paged)
        /// </summary>
        /// <param name="pageIndex">Page Index</param>
        /// <param name="pageCount">Page Count</param>
        /// <returns>list of items (Paged)</returns>
        //IQueryable<Item> FindItems(int pageIndex, int pageCount);

        /// <summary>
        /// Find Ad by id
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>Ad</returns>
        AdDTO FindAdByID(int id);

        /// <summary>
        /// Find item by id
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>item</returns>
        //Item FindItemByID(int id);

        /// <summary>
        /// Find single Ad by query (Expression)
        /// </summary>
        /// <param name="query">Query</param>
        /// <returns>returned ad</returns>
        //Ad FindAdBy(Expression<Func<Ad, bool>> query);

        /// <summary>
        /// Find single item by query (Expression)
        /// </summary>
        /// <param name="query">Query</param>
        /// <returns>returned item</returns>
        //Item FindItemBy(Expression<Func<Item, bool>> query);
    }
}